package com.kylin.common.core.filter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 默认接口日志处理器
 * @author wuhao
 * @version 1.0 - 2023/4/23
 */
public class DefaultApiLoginHandler implements ApiLogHandler {

    private Logger logger = LoggerFactory.getLogger("API");

    @Override
    public void handle(ApiLog apiLog) {
        logger.info("\n【接口名称】: {} \n【接口路径】：{} \n【接口入参】：{} \n【接口出参】：{} \n【接口耗时】：{} ms",
                apiLog.getUrl(),
                apiLog.getUrl(),
                apiLog.getParams(),
                apiLog.getResult(),
                apiLog.getTimes());
    }
}
